program TangentPoint;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x,y,x0,y0,x1,y1,R,a1,a2,b1,b2,c1,c2: real;

begin
  write('x0=');
  readln(x0);
  write('y0=');
  readln(y0);
  write('x1=');
  readln(x1);
  write('y1=');
  readln(y1);
  write('R=');
  readln(R);
  x:=(x0-x1);
  y:=(y0-y1);
  a1:=(-R*x-y*sqrt(x*x+y*y-R*R))/(x*x+y*y);
  a2:=(-R*x+y*sqrt(x*x+y*y-R*R))/(x*x+y*y);
  b1:=(-R*y*y+x*sqrt(x*x+y*y-R*R))/(x*x+y*y);
  b2:=(-R*y*y-x*sqrt(x*x+y*y-R*R))/(x*x+y*y);
  c1:=-a1*x0-b1*y0;
  c2:=-a2*x0-b2*y0;

  write('a1=');
  writeln(a1);
  write('b1=');
  writeln(b1);
  write('c1=');
  writeln(c1);
  write('a2=');
  writeln(a2);
  write('b2=');
  writeln(b2);
  write('c2=');
  writeln(c2);
  readln;
end.
